[IA64] Fix a memory allocation bug in MCA
authorAlex Williamson <alex.williamson@hp.com>
Sun, 15 Jul 2007 19:32:56 +0000 (13:32 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Sun, 15 Jul 2007 19:32:56 +0000 (13:32 -0600)
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
xen/arch/ia64/linux-xen/mca.c

index 68fa284e2dfaaf35ed854b058698db312e47ef55..fb9686a9ba557798cd91c5253ff3920c1f99ad09 100644 (file)
@@ -184,7 +184,7 @@ static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES];
 #define IA64_LOG_ALLOCATE(it, size) \
        do { \
                unsigned int pageorder; \
-               pageorder  = get_order_from_bytes(sizeof(struct ia64_mca_cpu)); \
+               pageorder = get_order_from_bytes(size); \
                ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
                  (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
                ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \